package com.yyh1;

public class Circle {
    //属性
    //圆的半径
    private double radius;

    public Circle() {
    }

    public Circle(double radius) {
        this.radius = radius;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }
    //行为
    //圆的面积
    public double getArea(){
        return 3.14*radius*radius;
    }
    //圆的周长
    public double getPerimeter(){
        return 2*3.14*radius;
    }
    //输出
    public void show(){
        System.out.println("圆的半径为："+radius+"，圆的周长为："+getPerimeter()+"，圆的面积为："+getArea());
    }
}
